<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE HTML>
<html>
<head>
    <!--head-->
    <head>
    <meta charset="UTF-8">
    <title><?php echo ((isset($title ) && ($title !== ""))?($title ):"微校云"); ?></title>
    <meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
    <link rel="stylesheet" href="<?php echo (C("WEUI_CSS")); ?>weui.css">
    <link rel="stylesheet" href="<?php echo (C("TSOO")); ?>">
    <script src="<?php echo (C("JQ")); ?>"></script>
    <script src="<?php echo (C("WEUI_JS")); ?>weui.min.js"></script>
    
    <style>
        /*头部*/
        #beginning {
            text-align: center;
            margin: 5px 0 5px 0;
        }

        #beginning span {
            font-size: 20px;
            color: #1296db;
        }

        #beginning i {
            color: #9B9B9B;
            margin: 0 10px 0 10px;
        }

        /*票*/
        table {
            width: 100%;
        }

        td {
            width: 50%;
        }

        .imgg { /*始/终图片*/
            height: 20px;
            float: left;
            padding-top: 3px;
            padding-left: 5px;
            padding-right: 5px;
        }

        .ff { /*起始地*/
            font-size: 14px;
        }

        .pgg { /*详细地点*/
            padding-left: 30px;
            font-size: 14px;
        }

        .pfgg { /*发车时间*/
            padding-left: 10px;
            font-size: 10px;
        }

        .button { /*订票按钮*/
            background: #1AAD19;
            padding: 3px 25px 3px 25px;
            border-radius: 5px;
            color: white;
        }

        /*发车状态*/
        .fc {
            font-size: 14px;
            color: #10AEFF;
            margin-left: 120px;
        }
    </style>
    <style>
        body {
            margin-top: 85px;
            margin-bottom: 70px;
        }
        table {
            padding: 10px 0;
        }

        .ff {
            font-size: 16px;
        }
        .pfgg {
            font-size: 14px;
        }
        .fc {
            border:1px solid #10AEFF ;
            border-radius: 20px;
            padding: 2px 8px;
            font-size: 12px;
            margin-left: 30px;
        }
        .faretitle {
            text-align: center;
            padding: 10px 0;
            position: fixed;
            width:100%;
            height:55px;
            top: 0;
            left:0;
        }
        /*处理导航覆盖问题*/
        .nav_remove_cover {
            margin-top: 85px;
            margin-bottom: 70px;
        }
        /*导航大标题*/
        .ts_header {
            font-size: 19px;
        }
        /*导航小标题*/
        .ts_header_small {
            font-size: 15px;
        }
    </style>

</head>
</head>
<body>
<!-- 头部 -->

<?php if(C('IS_NAVBAR') != 0): ?><div class="weui-tabbar" style="position: fixed;bottom:0;">
        <a href="#" class="weui-tabbar__item " onclick="changeIndexStatus()">
                        <span style="display: inline-block;position: relative;">
                            <img id="indexImg" src="<?php echo (C("HOME_IMG")); ?>index<?php echo ((isset($nav1) && ($nav1 !== ""))?($nav1):'1'); ?>.png" alt=""
                                 class="weui-tabbar__icon">
                        </span>
            <p id="index" class="weui-tabbar__label <?php echo ($col1); ?>">首页</p>
        </a>
        <a href="#" class="weui-tabbar__item " onclick="changeServiceStatus()">
            <img id="serverImg" src="<?php echo (C("HOME_IMG")); ?>service<?php echo ((isset($nav2) && ($nav2 !== ""))?($nav2):'1'); ?>.png" alt="" class="weui-tabbar__icon">
            <p id="service" class="weui-tabbar__label <?php echo ($col2); ?>">客服</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="changeCarStatus()">
                        <span style="display: inline-block;position: relative;">
                            <img id="carImg" src="<?php echo (C("HOME_IMG")); ?>riding<?php echo ((isset($nav3) && ($nav3 !== ""))?($nav3):'1'); ?>.png" alt="" class="weui-tabbar__icon">
                        </span>
            <p id="car" class="weui-tabbar__label" <?php echo ($col3); ?>>我的订单</p>
        </a>
        <a href="#" class="weui-tabbar__item" onclick="changeMyStatus()">
            <img id="myImg" src="<?php echo (C("HOME_IMG")); ?>my<?php echo ((isset($nav4) && ($nav4 !== ""))?($nav4):'1'); ?>.png" alt="" class="weui-tabbar__icon">
            <p id="my" class="weui-tabbar__label <?php echo ($col4); ?>">我的</p>
        </a>

        <script>

            //初始化首页按钮
            $(function () {
                if('<?php echo ($col1); ?>'!==''){
                    $("#index").addClass("mycolor");
                    $('#indexImg').attr('src', '<?php echo (C("HOME_IMG")); ?>index2.png');
                }

            });


            function changeIndexStatus() {
                window.location.href = "<?php echo U('Home/Index/index');?>";
                /*改变导航颜色*/

            }

            function changeServiceStatus() {

                window.location.href = "<?php echo U('Home/Server/index');?>";

            }

            function changeCarStatus() {

                window.location.href = "<?php echo U('Home/MyTicket/getHadNoPayTicket');?>";

            }

            function changeMyStatus() {
                /*改变导航颜色*/
                window.location.href = "<?php echo U('Home/User/index');?>";

            }

        </script>
    </div><?php endif; ?>

<!-- /头部 -->

<!-- 主体 -->

    <div id="beginning">
        <div>
            <span>
                <?php if($from): else: ?> 暂无车次信息<?php endif; ?>
            </span>
        </div>
    </div>

    <!--头部开始-->
    <div class="faretitle ts_nav">
        <div class="ts_header"><span><?php echo ($from); ?></span>-<span><?php echo ($to); ?></span></div>
        <div class="ts_header_small">共<span><?php echo ($ticketNum); ?></span>条车票信息</div>
    </div>
    <!--头部结束-->

    <!--选票开始-->
    <?php if(is_array($tickets)): foreach($tickets as $key=>$v): ?><div style="border: 1px solid #efefef;padding-bottom: 5px; background: white;margin-bottom: 10px;">
            <table>
                <tr>
                    <td>
                        <div><img src="<?php echo (C("HOME_IMG")); ?>shi.png" alt="" class="imgg"></div>
                        <span class="ff"><?php echo ($v["addr_from"]); ?></span>
                    </td>
                    <td>
                        <div><img src="<?php echo (C("HOME_IMG")); ?>zhong.png" alt="" class="imgg"></div>
                        <span class="ff"><?php echo ($v["addr_to"]); ?></span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <span class="pfgg">发车时间:&nbsp;&nbsp;<?php echo ($v["addr_depart_time"]); ?></span>
                    </td>
                </tr>
                <tr>
                    <td colspan="2"><span
                            style="color: red;padding-left: 10px; font-size: 14px;">&yen;<?php echo ($v["addr_price"]); ?></span>
                        <span class="fc"><?php echo ($v["title"]); ?></span>
                        <div style="float: right;padding-right: 10px;">
                            <?php if($v["addr_depart_condition"] == 1): ?><a href="/WeChat/Bus/index.php/Home/Order/bookTicket/ticketId/<?php echo ($v["addr_id"]); ?>" class="button">订票</a>
                                <?php else: ?>
                                <a href="/WeChat/Bus/index.php/Home/PreOrder/prebookTicket/ticketId/<?php echo ($v["addr_id"]); ?>" class="button">预定</a><?php endif; ?>
                        </div>
                    </td>
                </tr>
            </table>
        </div><?php endforeach; endif; ?>




<!-- /主体 -->

<!-- 底部 -->



<!--用于将配置注入到js-->
<!--将配置加载到js-->
<script type="text/javascript">
(function(){
	var ThinkPHP = window.Think = {
	    "WEB_API": "<?php echo C('WEB_API');?>",
		"ROOT"   : "/WeChat/Bus", //当前网站地址
		"APP"    : "/WeChat/Bus/index.php", //当前项目地址
		"PUBLIC" : "/WeChat/Bus/Public", //项目公共目录地址
		"DEEP"   : "<?php echo C('URL_PATHINFO_DEPR');?>", //PATHINFO分割符
		"MODEL"  : ["<?php echo C('URL_MODEL');?>", "<?php echo C('URL_CASE_INSENSITIVE');?>", "<?php echo C('URL_HTML_SUFFIX');?>"],
		"VAR"    : ["<?php echo C('VAR_MODULE');?>", "<?php echo C('VAR_CONTROLLER');?>", "<?php echo C('VAR_ACTION');?>"]
	}
})();
</script>

<!-- 用于加载js代码 -->



<!--顺序不要颠掉-->



<!-- /底部 -->
</body>
</html>